package com.xinnet.mms.emp.service.impl;

import java.sql.SQLException;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.xinnet.mms.emp.dao.PartyDao;
import com.xinnet.mms.emp.service.PartyService;
import com.xinnet.mms.entity.Emp;
import com.xinnet.mms.entity.Party;

@Service("partyService")
public class PartyServiceImpl implements PartyService {

	@Autowired
	private PartyDao partyDao;
	
	/**从db.hymanager.Party表获取所有员工信息*/
	@Override
	public List<Emp> getAllEmp() throws SQLException {
		return partyDao.getAllEmp();
	}

	/**匹配db.xinnet091020.party/emp表 员工是否离职*/
	@Override
	public Integer getEmpStatuByEmpno(String empno) throws SQLException {
		return partyDao.getEmpStatuByEmpno(empno);
	}

	@Override
	public List<Party> getAllPartyByptId(String ptId) {
		return partyDao.getAllPartyByptId(ptId);
	}
}
